import Vue from 'vue'
import VueRouter from 'vue-router'
// import Home from '../views/Home.vue'
import controller from '../views/controller/controller.vue'
import student from '../views/student/index.vue'
import linkApp from '../views/linkApp.vue'

Vue.use(VueRouter)

const routes = [{
        path: '/',
        name: 'linkApp',
        component: linkApp
    },
    {
        path: '/controllerLogin',
        name: 'controllerLogin',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: function() {
            return import ( /* webpackChunkName: "controllerLogin" */ '../views/controllerLogin.vue')
        }
    },
    {
        path: '/studentApplication',
        name: 'studentApplication',
        // route level code-splitting
        // this generates a separate chunk (about.[hash].js) for this route
        // which is lazy-loaded when the route is visited.
        component: function() {
            return import ( /* webpackChunkName: "studentApplication" */ '../views/studentApplication.vue')
        }

    }, {
        path: '/studentRegister',
        name: 'studentRegister',
        component: function() {
            return import ( /* webpackChunkName: "studentLogin" */ '../views/studentRegister.vue')
        }
    }, {
        path: '/studentLogin',
        name: 'studentLogin',
        component: function() {
            return import ( /* webpackChunkName: "studentLogin" */ '../views/studentLogin.vue')
        }
    }, {
        path: '/controller',
        name: 'controller',
        component: controller,
        children: [{
            path: '',
            name: 'course',
            component: function() {
                return import ( /* webpackChunkName: "courseList" */ '../views/controller/courseList.vue')
            }
        }, {
            path: 'course',
            name: 'course',
            component: function() {
                return import ( /* webpackChunkName: "courseList" */ '../views/controller/courseList.vue')
            }
        }, {
            path: 'teacherList',
            name: 'teacherList',
            component: function() {
                return import ( /* webpackChunkName: "teacherList" */ '../views/controller/teacherList.vue')
            }
        }, {
            path: 'studentApply',
            name: 'studentApply',
            component: function() {
                return import ( /* webpackChunkName: "teachstudentApplyrList" */ '../views/controller/studentApply.vue')
            }
        }, {
            path: 'studentApplication',
            name: 'studentApplication',
            component: function() {
                return import ( /* webpackChunkName: "studentApplication" */ '../views/controller/studentApplication.vue')
            }
        }, {
            path: 'studentFiles',
            name: 'studentFiles',
            component: function() {
                return import ( /* webpackChunkName: "studentFiles" */ '../views/controller/studentFiles.vue')
            }
        }, ]
    }, {
        path: '/student',
        name: 'student',
        component: student,
        children: [{
                path: '',
                name: 'schoolCourse',
                component: function() {
                    return import ( /* webpackChunkName: "schoolCourse" */ '../views/student/schoolCourse.vue')
                }
            }, {
                path: 'schoolCourse',
                name: 'schoolCourse',
                component: function() {
                    return import ( /* webpackChunkName: "schoolCourse" */ '../views/student/schoolCourse.vue')
                }
            }, {
                path: 'schoolTeacher',
                name: 'schoolTeacher',
                component: function() {
                    return import ( /* webpackChunkName: "schoolTeacher" */ '../views/student/schoolTeacher.vue')
                }
            }, {
                path: 'myFollow',
                name: 'myFollow',
                component: function() {
                    return import ( /* webpackChunkName: "myFollow" */ '../views/student/myFollow.vue')
                }
            }, {
                path: 'myCourse',
                name: 'myCourse',
                component: function() {
                    return import ( /* webpackChunkName: "myFollow" */ '../views/student/myCourse.vue')
                }

            }




        ]
    }
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router